home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.cs.arizona.edu
/
ftp.cs.arizona.edu.tar
/
ftp.cs.arizona.edu
/
icon
/
newsgrp
/
group96a.txt
/
000166_icon-group-sender _Tue Jul 30 08:34:09 1996.msg
< prev
next >
Wrap
Internet Message Format
|
1996-09-05
|
1KB
Received: by cheltenham.cs.arizona.edu; Tue, 30 Jul 1996 14:20:04 MST
Date: Tue, 30 Jul 1996 08:34:09 -0700
From: kwalker@orville.premenos.com (Ken Walker)
Message-Id: <199607301534.IAA07013@varda.premenos.com>
To: icon-group@cs.arizona.edu, H.Lawson@tees.ac.uk
Subject: Re: Optional expressions
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Content-Md5: T/Q2/7fIM5nixKZOQBDrFA==
Errors-To: icon-group-errors@cs.arizona.edu
Status: O
> Date: Mon, 29 Jul 1996 15:54:02 +0100
> From: Hamish Lawson <H.Lawson@tees.ac.uk>
>
> What is the Icon idiom for making one of a series of conjoined
> expressions optional? Let's say I have the following series of
> expressions
>
> e1 & e2 & e3 & e4
>
> and I want e3 to be evaluated if possible but not to cause the failure
> of the enclosing expression.
You can do
e1 & e2 & (e3; e4)
e3 is evaluated but regardless of whether is succeeds or fails, e4 is
always evaluated and e4 determines whether (e3; e4) succeeds or fails.
Ken Walker, kwalker@premenos.com
Premenos Coporation, Concord, Ca. 94520